import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/exam/execute/worksheet/page',
    method: 'get',
    params: query
  })
}

export function fetchListByProject(query) {
  return request({
    url: '/exam/execute/worksheet/pageByProject',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/exam/execute/worksheet',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/exam/execute/worksheet/' + id,
    method: 'get'
  })
}

export function listPaperByProjectId(query) {
  return request({
    url: '/exam/execute/worksheet/listPaperByProjectId',
    method: 'get',
    params: query
  })
}

export function delObj(id) {
  return request({
    url: '/exam/execute/worksheet/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/exam/execute/worksheet',
    method: 'put',
    data: obj
  })
}

export function submit(obj) {
  return request({
    url: '/exam/execute/worksheet/submit',
    method: 'post',
    data: obj
  })
}
export function genWord(obj) {
  return request({
    url: '/exam/execute/worksheet/genWord/',
    method: 'post',
    data: obj
  })
}
